﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_Reply.aspx.cs" Inherits="Admin_Admin_Reply" %>

<%@ Register Assembly="XControl" Namespace="XControl" TagPrefix="XCL" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <XCL:XGridView ID="XGridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="ID" DataSourceID="ObjectDataSource1" AllowSorting="True">
            <Columns>
                <asp:TemplateField HeaderText="编号" SortExpression="ID">
                    <itemtemplate>
<asp:LinkButton id="IDLinkButton1" runat="server"  CausesValidation="False" Text='<%# Eval("ID") %>' CommandName="Select"></asp:LinkButton>
</itemtemplate>
                    <headerstyle cssclass="IntHead" />
                    <itemstyle cssclass="IntItem" />
                </asp:TemplateField>
                <asp:BoundField DataField="TitleID" HeaderText="标题" SortExpression="TitleID">
                    <headerstyle cssclass="IntHead" />
                    <itemstyle cssclass="IntItem" />
                </asp:BoundField>
                <asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="UserName">
                    <headerstyle cssclass="TextHead" />
                    <itemstyle cssclass="TextItem" />
                </asp:BoundField>
                <asp:BoundField DataField="IP" HeaderText="地址" SortExpression="IP">
                    <headerstyle cssclass="TextHead" />
                    <itemstyle cssclass="TextItem" />
                </asp:BoundField>
                <asp:BoundField DataField="PostTime" HeaderText="时间" SortExpression="PostTime">
                    <headerstyle cssclass="DateHead" />
                    <itemstyle cssclass="DateItem" />
                </asp:BoundField>
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </XCL:XGridView>
    
    </div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="XCMSData.Reply"
            DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" SelectCountMethod="SelectCount"
            SelectMethod="SelectAll" TypeName="XCMSData.Reply" EnablePaging="True" 
        SortParameterName="orderClause">
            <SelectParameters>
                <asp:Parameter Name="whereClause" Type="String" />
                <asp:Parameter Name="orderClause" Type="String" />
                <asp:Parameter Name="selects" Type="String" />
                <asp:Parameter DefaultValue="0" Name="startRowIndex" Type="Int32" />
                <asp:Parameter DefaultValue="2147483647" Name="maximumRows" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <XCL:XFormView ID="XFormView1" runat="server" AutoRefreshXGridView="True" DataKeyNames="ID"
            DataSourceID="ObjectDataSource2">
            <EditItemTemplate>
                <div id="XFormView1_Edit" class="XFormView">
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                编号：</div>
                            <div class="ItemValue">
                                <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>'></asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                标题：</div>
                            <div class="ItemValue">
                                <XCL:NumberBox ID="TitleIDNumberBox" runat="server" Text='<%# Bind("TitleID") %>'>
                                &nbsp;
                                </XCL:NumberBox></div>
                        </div>
                        <div class="Item">
                            <div class="ItemName">
                                用户编号：</div>
                            <div class="ItemValue">
                                <XCL:NumberBox ID="UserIDNumberBox" runat="server" Text='<%# Bind("UserID") %>'>
                                &nbsp;
                                </XCL:NumberBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                用户名：</div>
                            <div class="ItemValue">
                                <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>'>
                                </asp:TextBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                地址：</div>
                            <div class="ItemValue">
                                <XCL:IPBox ID="IPIPBox" runat="server" Text='<%# Bind("IP") %>'>
                                &nbsp;
                                </XCL:IPBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                时间：</div>
                            <div class="ItemValue">
                                <XCL:DateBox ID="PostTimeDateBox" runat="server" Text='<%# Bind("PostTime", "{0:yyyy-MM-dd HH:mm:ss}") %>'>
                                &nbsp;
                                </XCL:DateBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                内容：</div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemValue">
                                <asp:TextBox ID="ContentTextBox" runat="server" Height="130px" Text='<%# Bind("Content") %>'
                                    TextMode="MultiLine" Width="440px">
                                </asp:TextBox></div>
                        </div>
                    </div>
                    <div class="Foot">
                        <div style="float: left">
                            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="true" CommandName="Update"
                                Text="更新">
                            </asp:LinkButton></div>
                        <div style="width: 5px; float: left">
                        </div>
                        <div style="float: left">
                            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
                                Text="取消">
                            </asp:LinkButton></div>
                    </div>
                </div>
            </EditItemTemplate>
            <InsertItemTemplate>
                <div id="XFormView1_Inst" class="XFormView">
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                标题：</div>
                            <div class="ItemValue">
                                <XCL:NumberBox ID="TitleIDNumberBox" runat="server" Text='<%# Bind("TitleID") %>'>
                                &nbsp;
                                </XCL:NumberBox></div>
                        </div>
                        <div class="Item">
                            <div class="ItemName">
                                用户编号：</div>
                            <div class="ItemValue">
                                <XCL:NumberBox ID="UserIDNumberBox" runat="server" Text='<%# Bind("UserID") %>'>
                                &nbsp;
                                </XCL:NumberBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                用户名：</div>
                            <div class="ItemValue">
                                <asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>'>
                                </asp:TextBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                地址：</div>
                            <div class="ItemValue">
                                <XCL:IPBox ID="IPIPBox" runat="server" Text='<%# Bind("IP") %>'>
                                &nbsp;
                                </XCL:IPBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                时间：</div>
                            <div class="ItemValue">
                                <XCL:DateBox ID="PostTimeDateBox" runat="server" Text='<%# Bind("PostTime", "{0:yyyy-MM-dd HH:mm:ss}") %>'>
                                &nbsp;
                                </XCL:DateBox></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                内容：</div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemValue">
                                <asp:TextBox ID="ContentTextBox" runat="server" Height="130px" Text='<%# Bind("Content") %>'
                                    TextMode="MultiLine" Width="440px">
                                </asp:TextBox></div>
                        </div>
                    </div>
                    <div class="Foot">
                        <div style="float: left">
                            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="true" CommandName="Insert"
                                Text="插入">
                            </asp:LinkButton></div>
                        <div style="width: 5px; float: left">
                        </div>
                        <div style="float: left">
                            <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
                                Text="取消">
                            </asp:LinkButton></div>
                    </div>
                </div>
            </InsertItemTemplate>
            <ItemTemplate>
                <div id="XFormView1_Item" class="XFormView">
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                编号：</div>
                            <div class="ItemValue">
                                <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>'></asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                标题：</div>
                            <div class="ItemValue">
                                <asp:Label ID="TitleIDLabel" runat="server" Text='<%# Bind("TitleID") %>'></asp:Label></div>
                        </div>
                        <div class="Item">
                            <div class="ItemName">
                                用户编号：</div>
                            <div class="ItemValue">
                                <asp:Label ID="UserIDLabel" runat="server" Text='<%# Bind("UserID") %>'></asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                用户名：</div>
                            <div class="ItemValue">
                                <asp:Label ID="UserNameLabel" runat="server" Text='<%# Bind("UserName") %>'></asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                地址：</div>
                            <div class="ItemValue">
                                <asp:Label ID="IPLabel" runat="server" Text='<%# Bind("IP") %>'></asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                时间：</div>
                            <div class="ItemValue">
                                <asp:Label ID="PostTimeLabel" runat="server" Text='<%# Bind("PostTime", "{0:yyyy-MM-dd HH:mm:ss}") %>'>
                                </asp:Label></div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemName">
                                内容：</div>
                        </div>
                    </div>
                    <div class="Row">
                        <div class="Item">
                            <div class="ItemValue">
                                <asp:Label ID="ContentLabel" runat="server" Style="word-break: break-all; min-height: 130px"
                                    Text='<%# Bind("Content") %>' Width="440px"></asp:Label></div>
                        </div>
                    </div>
                    <div class="Foot">
                        <div style="float: left">
                            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="false" CommandName="Edit"
                                Text="编辑">
                            </asp:LinkButton></div>
                        <div style="width: 5px; float: left">
                        </div>
                        <div style="float: left">
                            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="false" CommandName="New"
                                Text="新建">
                            </asp:LinkButton></div>
                        <div style="width: 5px; float: left">
                        </div>
                        <div style="float: left">
                            <asp:LinkButton ID="CancelSelectButton" runat="server" CausesValidation="false" CommandName="CancelSelect"
                                Text="取消">
                            </asp:LinkButton></div>
                    </div>
                </div>
            </ItemTemplate>
            <EmptyDataTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="New">新增评论</asp:LinkButton>
            </EmptyDataTemplate>
        </XCL:XFormView>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" DataObjectTypeName="XCMSData.Reply"
            InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="FindByKey"
            TypeName="XCMSData.Reply" UpdateMethod="Update">
            <SelectParameters>
                <asp:ControlParameter ControlID="XGridView1" Name="__ID" PropertyName="SelectedValue"
                    Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </form>
</body>
</html>
